<?php

/**
 * NOTICE OF LICENSE
 *
 * THIS SOURCE FILE IS PART OF EVEBIT'S PRIVATE PROJECT.
 * 
 * DO NOT USE THIS FILE IN OTHER PLACE.
 *
 * @package   App_Sample
 * @author    Cheng Wei <berlios.o@gmail.com>
 * @version   $$Id: TimeZero.php 130 2011-03-18 03:10:02Z cheng.wei $$
 * @copyright Copyright (c) 2008 Evebit Inc. China (http://www.evebit.com)
 */

/**
 * Check a date is zero or not
 * 
 * @package   App_Sample
 * @author    Cheng Wei <berlios.o@gmail.com>
 * @version   $$Id: TimeZero.php 130 2011-03-18 03:10:02Z cheng.wei $$
 */
class Evebit_View_Helper_TimeZero extends Zend_View_Helper_Abstract {
	
	/**
	 * Check a date is zero or not 
	 * 
	 * @param Zend_Date $date
	 * @return bool
	 */
	public function timeZero($date) {
		$timeZero = new Zend_Date("0000-00-00 00:00:00", Zend_Date::ISO_8601);
		$timeZero->setTimezone(date_default_timezone_get());
		if ($timeZero->toString() == $date->toString()) {
			return true;
		} else {
			return false;
		}
	}

}